<template>
  <!-- 帖子 -->
  <div class="documet">
    <navigation id="navbar"></navigation>
    <div class="particular">
      <div class="particular-content">
        <div class="content-title">
          <h3>{{blogsCode.title}}</h3>
          <div class="content-img">
            <img src="http://1812.img.pp.sohu.com.cn/images/blog/2009/11/18/18/8/125b6560a6ag214.jpg" alt />
            <span>
              <i class="content-i">{{blogsCode.nickname}}</i>
              <i>{{blogsCode.create_time}}</i>
            </span>
          </div>
        </div>
        <div class="particular-item" v-html="blogsCode.content"></div>
      </div>
    </div>
    <comment></comment>
    <bottoms></bottoms>
  </div>
</template>

<script>
import { singleBlogs } from '../../network/blogs'
import Navigation from '../../components/navigation/Navigation'
import Bottoms from '../../components/bottoms/Bottoms'
import comment from './childcomps/comment'

export default {
  name: 'Particulars',
  components: {
    Navigation,
    Bottoms,
    comment
  },

  data() {
    return {
      blogsCode: {}
    }
  },
  created() {
    this.singleBlogs()
  },
  mounted() {},
  methods: {
    singleBlogs() {
      singleBlogs(this.$route.params.id).then(res => {
        this.blogsCode = res.data
        document.title = this.blogsCode.title
      })
    }
  }
}
</script >

<style>
#navbar {
  min-width: 1300px;
  position: fixed;
  z-index: 9;
}
.documet {
  background-color: #dce2da;
}
.particular {
  padding-top: 100px;
}
.particular-content {
  width: 80%;
  background-color: #f5f6f4;
  margin: 0 auto;
  border-radius: 15px;
  box-shadow: 0px 0px 5px 5px rgba(100, 100, 100, 0.8);
  padding-bottom: 30px;
  margin-bottom: 15px;
}
.content-title {
  width: 80%;
  padding-top: 30px;
  text-align: center;
  margin: 0 auto;
  border-bottom: 1px solid rgba(100, 100, 100, 0.5);
  margin-bottom: 30px;
}
.content-title h3 {
  font-size: 35px;
  font-weight: 700;
}
.content-img {
  margin-top: 30px;
  margin-bottom: 30px;
}
.content-img img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.content-img span {
  padding-left: 20px;
}
.content-i {
  padding-right: 20px;
}
i {
  font-style: normal;
  font-size: 16px;
}
.particular-item {
  width: 80%;
  margin: 0 auto;
  padding: 10px 20px;
  background-color: #e5e8eb !important;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(100, 100, 100, 0.5);
}
</style>